﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Globalization;

namespace _15.CalculatesNumberOfDaysBetweenDates
{
    class CalculatesNumberOfDaysBetweenDates
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Enter dates in format Day.Month.Year.");
            Console.WriteLine("Enter the first date:");
            string dateOne = Console.ReadLine();
            DateTime firstDate = DateTime.ParseExact(dateOne, "d.MM.yyyy", CultureInfo.InvariantCulture);
            Console.WriteLine("Enter the second date:");
            string dateTwo = Console.ReadLine();
            DateTime secondDate = DateTime.ParseExact(dateTwo, "d.MM.yyyy", CultureInfo.InvariantCulture);
            Console.WriteLine(Math.Abs((firstDate - secondDate).TotalDays));
        }
    }
}
